<template>
  <view class="box">
    <view class="box1" @click="back">
      <view class="">邀请好友赠送优惠卷</view>
      <view class="">
        <uv-icon name="play-circle-fill" color="#008c8c" size="50rpx"></uv-icon>
      </view>
    </view>
    <view class="box2">
      <uv-tabs :list="list" @click="click" activeStyle="color: #008c8c" lineColor="#008c8c" :scrollable="false">
      </uv-tabs>
      <view class="box12" v-if="current == 0">
        <image v-for="item in 2" src="/static/image/ysy.png"></image>
      </view>
      <view class="box12" v-if="current == 1">
        <image v-for="item in 2" src="/static/image/wsy.png"></image>
      </view>
    </view>
  </view>
</template>

<script setup>
  import {
    ref
  } from 'vue';
  const list = ref(
    [{
      name: '未使用',
    }, {
      name: '已使用',
    }]
  )
  const current = ref(0)
  const click = ((item) => {
    // console.log('item', item);
    current.value = item.index
  })

  const back = (() => {
    uni.navigateBack({
      delta: 1, // 返回1个，如果是2，返回2个页面
    });
  })
</script>

<style lang="scss">
  @import url("youhuij.scss");
</style>